home *** CD-ROM | disk | FTP | other *** search
- tell application "PsyScript"
- activate
- begin experiment
- --load function libraries
- set fileHelper to load script file ("" & Psyscript base folder & "libraries:file.lib")
-
- if ((every click area whose noticed is true) = {}) then
- --set bounds of click area index to {left, top, right, bottom}
- --think of it as {x,y} {x,y}
- set noticed of click area 1 to true
- set bounds of click area 1 to {20, 30, 50, 70}
- set mapping of click area 1 to "top left corner"
-
- set noticed of click area 2 to true
- set bounds of click area 2 to {200, 150, 500, 250}
- set mapping of click area 2 to "number 2"
- else
- --something is noticed
- end if
- set theClicks to {} & (index of every click area whose noticed is true)
-
- repeat with clickAreaIndex in theClicks
- tell click area clickAreaIndex
- set n to bounds
- set areaMapping to mapping
- set centroid to fileHelper's getCentroid(n)
- do trial "'?5'(?1 ?2) '?5'(?3 ?2) '?5'(?1 ?4) '?5'(?3 ?4) '?6'(?7 ?8)!t(0)" given {} & n & clickAreaIndex & areaMapping & centroid
- end tell
- end repeat
- do trial "'these are the noticed click areas'"
- end experiment
- end tell
-